// src/App.tsx
import AppLayout from '@/pages/AppLayout';
import React, { useState } from 'react';
import { Outlet } from 'react-router-dom';
import Login from './work/login/Login';
const App: React.FC = () => {
  const [isLoggedIn, setIsLoggedIn] = useState(false);

  const handleLoginSuccess = () => {
    setIsLoggedIn(true);
  };

  return (
    <div>
      {!isLoggedIn ? (
        <Login onLoginSuccess={handleLoginSuccess} />
      ) : (
        <AppLayout>
          <Outlet />
        </AppLayout>
      )}
    </div>
  );
};

export default App;
